↳ Prolog
↳ PrologToPiTRSProof
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
FIB_IN(s(s(X)), N) → U31(X, N, fib_in(s(X), N1))
FIB_IN(s(s(X)), N) → FIB_IN(s(X), N1)
U31(X, N, fib_out(s(X), N1)) → U41(X, N, N1, fib_in(X, N2))
U31(X, N, fib_out(s(X), N1)) → FIB_IN(X, N2)
U41(X, N, N1, fib_out(X, N2)) → U51(X, N, add_in(N1, N2, N))
U41(X, N, N1, fib_out(X, N2)) → ADD_IN(N1, N2, N)
ADD_IN(X, s(Y), s(N)) → U21(X, Y, N, add_in(X, Y, N))
ADD_IN(X, s(Y), s(N)) → ADD_IN(X, Y, N)
ADD_IN(s(X), Y, s(N)) → U11(X, Y, N, add_in(X, Y, N))
ADD_IN(s(X), Y, s(N)) → ADD_IN(X, Y, N)
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
FIB_IN(s(s(X)), N) → U31(X, N, fib_in(s(X), N1))
FIB_IN(s(s(X)), N) → FIB_IN(s(X), N1)
U31(X, N, fib_out(s(X), N1)) → U41(X, N, N1, fib_in(X, N2))
U31(X, N, fib_out(s(X), N1)) → FIB_IN(X, N2)
U41(X, N, N1, fib_out(X, N2)) → U51(X, N, add_in(N1, N2, N))
U41(X, N, N1, fib_out(X, N2)) → ADD_IN(N1, N2, N)
ADD_IN(X, s(Y), s(N)) → U21(X, Y, N, add_in(X, Y, N))
ADD_IN(X, s(Y), s(N)) → ADD_IN(X, Y, N)
ADD_IN(s(X), Y, s(N)) → U11(X, Y, N, add_in(X, Y, N))
ADD_IN(s(X), Y, s(N)) → ADD_IN(X, Y, N)
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
ADD_IN(X, s(Y), s(N)) → ADD_IN(X, Y, N)
ADD_IN(s(X), Y, s(N)) → ADD_IN(X, Y, N)
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
ADD_IN(X, s(Y), s(N)) → ADD_IN(X, Y, N)
ADD_IN(s(X), Y, s(N)) → ADD_IN(X, Y, N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
ADD_IN(s(X), Y) → ADD_IN(X, Y)
ADD_IN(X, s(Y)) → ADD_IN(X, Y)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
U31(X, N, fib_out(s(X), N1)) → FIB_IN(X, N2)
FIB_IN(s(s(X)), N) → U31(X, N, fib_in(s(X), N1))
FIB_IN(s(s(X)), N) → FIB_IN(s(X), N1)
fib_in(s(s(X)), N) → U3(X, N, fib_in(s(X), N1))
fib_in(s(0), s(0)) → fib_out(s(0), s(0))
fib_in(0, 0) → fib_out(0, 0)
U3(X, N, fib_out(s(X), N1)) → U4(X, N, N1, fib_in(X, N2))
U4(X, N, N1, fib_out(X, N2)) → U5(X, N, add_in(N1, N2, N))
add_in(X, s(Y), s(N)) → U2(X, Y, N, add_in(X, Y, N))
add_in(s(X), Y, s(N)) → U1(X, Y, N, add_in(X, Y, N))
add_in(0, 0, 0) → add_out(0, 0, 0)
U1(X, Y, N, add_out(X, Y, N)) → add_out(s(X), Y, s(N))
U2(X, Y, N, add_out(X, Y, N)) → add_out(X, s(Y), s(N))
U5(X, N, add_out(N1, N2, N)) → fib_out(s(s(X)), N)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
FIB_IN(s(s(X))) → U31(X, fib_in(s(X)))
U31(X, fib_out(N1)) → FIB_IN(X)
FIB_IN(s(s(X))) → FIB_IN(s(X))
fib_in(s(s(X))) → U3(X, fib_in(s(X)))
fib_in(s(0)) → fib_out(s(0))
fib_in(0) → fib_out(0)
U3(X, fib_out(N1)) → U4(N1, fib_in(X))
U4(N1, fib_out(N2)) → U5(add_in(N1, N2))
add_in(X, s(Y)) → U2(add_in(X, Y))
add_in(s(X), Y) → U1(add_in(X, Y))
add_in(0, 0) → add_out(0)
U1(add_out(N)) → add_out(s(N))
U2(add_out(N)) → add_out(s(N))
U5(add_out(N)) → fib_out(N)
fib_in(x0)
U3(x0, x1)
U4(x0, x1)
add_in(x0, x1)
U1(x0)
U2(x0)
U5(x0)
From the DPs we obtained the following set of size-change graphs: